<?php

namespace app\admin\model;

use think\Model;

/**
 * 社群售卖点击
 * @package app\admin\model
 */
class ResourceSaleClickShare extends Model
{
    /**
     * 统计社群售卖点击或分享人数数据
     * @param $where
     * @return int
     */
    public static function countResourceSaleClickShare($where)
    {
        return self::where($where)->count('DISTINCT uid');
    }

    /**
     * 统计当日社群售卖点击或分享人数数据
     * @param $where
     * @return int
     */
    public static function countTodayResourceSaleClickShare($where)
    {
        return self::where($where)->whereDay('create_time')->count('DISTINCT uid');
    }

}